﻿Imports EVOLTA.Promocion.Bl.Bc
Imports EVOLTA.Promocion.Bl.Be

Partial Class Devoluciones_Devoluciones
    Inherits System.Web.UI.Page

    Private devoluciones As List(Of Edevolucion) = Nothing
    Dim expression As String = Nothing
    Dim direction As SortDirection = SortDirection.Ascending

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Response.CacheControl = "no-cache"
        Response.AddHeader("Pragma", "no-cache")
        Response.Expires = -1
        '***********************************************************'
        If Not IsPostBack Then
            cargarDevolucion()
        End If
    End Sub
    Protected Sub gvwDevolucion_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) _
    Handles gvwDevolucion.RowDataBound
        If e.Row.RowType = DataControlRowType.DataRow Then
            e.Row.Attributes.Add("OnMouseOver", "Resaltar_On(this);")
            e.Row.Attributes.Add("OnMouseOut", "Resaltar_Off(this);")
            e.Row.Attributes("OnClick") = Page.ClientScript.GetPostBackClientHyperlink(Me.gvwDevolucion, "Select$" + e.Row.RowIndex.ToString)
            e.Row.Style.Add("cursor", "hand")
        End If
    End Sub
    Protected Sub gvwDevolucion_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles gvwDevolucion.RowEditing       

    End Sub
    Private Sub cargarDevolucion()
        devoluciones = Rdevolucion.SeleccionarTodo(Me.Master.descEmpresa, False, Me.Master.idProyecto, Me.Master.idEtapa)
        Session("lista") = devoluciones
        If Not devoluciones Is Nothing Then
            gvwDevolucion.DataSource = devoluciones
            gvwDevolucion.DataBind()
        End If
    End Sub

End Class
